package com.ruoyi.cms.domain;

import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 地区层级对象 cms_territory
 *
 * @author houyong
 * @date 2025-11-09
 */
public class CmsTerritory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 地区唯一标识
     */
    private String id;

    /**
     * 地区编码
     */
    @Excel(name = "地区编码")
    private String territoryCode;

    /**
     * 地区级别（2=省级，3=市级/区级等）
     */
    @Excel(name = "地区级别", readConverterExp = "2==省级，3=市级/区级等")
    private Long territoryLevel;

    /**
     * 地区名称
     */
    @Excel(name = "地区名称")
    private String territoryName;

    /**
     * 地区拼音
     */
    @Excel(name = "地区拼音")
    private String territoryPinyin;

    /**
     * 排序号
     */
    @Excel(name = "排序号")
    private String territorySort;

    /**
     * 父级地区ID
     */
    @Excel(name = "父级地区ID")
    private String parentId;

    /**
     * 经度
     */
    @Excel(name = "经度")
    private BigDecimal xwgs84;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    private BigDecimal ywgs84;


    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setTerritoryCode(String territoryCode) {
        this.territoryCode = territoryCode;
    }

    public String getTerritoryCode() {
        return territoryCode;
    }

    public void setTerritoryLevel(Long territoryLevel) {
        this.territoryLevel = territoryLevel;
    }

    public Long getTerritoryLevel() {
        return territoryLevel;
    }

    public void setTerritoryName(String territoryName) {
        this.territoryName = territoryName;
    }

    public String getTerritoryName() {
        return territoryName;
    }

    public void setTerritoryPinyin(String territoryPinyin) {
        this.territoryPinyin = territoryPinyin;
    }

    public String getTerritoryPinyin() {
        return territoryPinyin;
    }

    public void setTerritorySort(String territorySort) {
        this.territorySort = territorySort;
    }

    public String getTerritorySort() {
        return territorySort;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setXwgs84(BigDecimal xwgs84) {
        this.xwgs84 = xwgs84;
    }

    public BigDecimal getXwgs84() {
        return xwgs84;
    }

    public void setYwgs84(BigDecimal ywgs84) {
        this.ywgs84 = ywgs84;
    }

    public BigDecimal getYwgs84() {
        return ywgs84;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("territoryCode", getTerritoryCode())
                .append("territoryLevel", getTerritoryLevel())
                .append("territoryName", getTerritoryName())
                .append("territoryPinyin", getTerritoryPinyin())
                .append("territorySort", getTerritorySort())
                .append("parentId", getParentId())
                .append("xwgs84", getXwgs84())
                .append("ywgs84", getYwgs84())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
